<style rel="styleesheet" lang="less">
@media screen and (min-width: 829px) {
  .workDynamicst {
    background-color: #F6F7FB;
    .img-box {
      /*width: 75rem;*/
      /*width: 100%;*/
      /*height: 32.86rem;*/
      max-width: 1100px;
      height: auto;
      text-align: center;
      position: relative;
      box-sizing: border-box;
      margin: 0 auto 2.6rem;
      img {
        /*width: 75rem;*/
        /*max-width: 100%;*/
        /*height: 32.86rem;*/
        width: 100%;
        /*height: auto;*/
        max-height: 37.14rem;
      }
      .shadow {
        box-sizing: border-box;
        width: 100%;
        /*width: 99%;*/
        /*left: 0.5%;*/
        position: absolute;
        height: 6.2rem;
        /*bottom: 0.5%;*/
        bottom: 0;
        background: -webkit-gradient(linear, 0 0, 0 bottom, from(rgba(0, 0, 0, 0.05)), to(#000000));
        color: white;
        span:nth-child(1) {
          position: absolute;
          left: 5.64rem;
          bottom: 3.28rem;
          font-size: 1.57rem;
          
          color: rgba(255, 255, 255, 1);
        }
        span:nth-child(2) {
          position: absolute;
          left: 5.64rem;
          bottom: 1.49rem;
          font-size: 1rem;
          
          color: rgba(255, 255, 255, 1);
        }
      }
      .prev {
        position: absolute;
        display: block;
        width: 4.29rem;
        height: 4.29rem;
        left: -6.79rem;
        bottom: 0.36rem;
        border-radius: 50%;
        background: rgba(255, 255, 255, 1);
        color: rgba(204, 204, 204, 1);
        cursor: pointer;
        text-align: center;
        line-height: 4.29rem;
        font-size: 1.36rem;
      }
      .next {
        position: absolute;
        display: block;
        width: 4.29rem;
        height: 4.29rem;
        right: -6.79rem;
        bottom: 0.36rem;
        border-radius: 50%;
        background: rgba(255, 255, 255, 1);
        color: rgba(204, 204, 204, 1);
        cursor: pointer;
        text-align: center;
        line-height: 4.29rem;
        font-size: 1.36rem;
      }
    }
    .top-box {
      position: relative;
      width: 100%;
      text-align: center;
    }
    .title-box {
      display: none;
      position: absolute;
      left: 5.64rem;
      bottom: 0;
    }

    .contentTop {
      /*width: 70%;*/
      max-width: 1050px;
      margin: 0 auto;
      .content {
        width: 90%;
        margin:0 auto;
        padding:2.6rem;
        overflow: hidden;
        p {
          /*background-color: red;*/
          font-size: 1rem;
          
          color: rgba(102, 102, 102, 1);
          line-height: 1.71rem;
        }
        li {
          margin-top: 2rem;
          text-align: center;
          h3 {
            font-size: 1rem;
            
            color: rgba(102, 102, 102, 1);
            line-height: 1.71rem;
          }
        }
      }
      .other-link {
        display: none
      }
    }
    .content img {
      box-sizing: border-box !important;
      padding: 0 15% !important;
      width: 100% !important;
      height: initial !important;
    }
  }
}

@media screen and (max-width: 829px) {
  .workDynamicst {
    * {
      box-sizing: border-box;
    }
    .contentTop {
      padding: 0 0.34rem;
    }
    .img-box {
      display: none;
    }
    .title {
      padding: 0.5rem 0;
      font-size: 0.54rem;
      color: #1a1a1a
    }
    .time {
      color: #888888;
      font-size: 0.26rem;
    }
    .other-link {
      font-size: 0.24rem;
      color: #3E3A39;
      padding: 0.7rem 0;
      line-height: 0.35rem;
    }
    .pre {
      margin-bottom: 0.2rem;
    }
    .contet {
      color: #3E3A39;
      font-size: 0.32rem;
    }
    .content img {
      width: 100% !important;
    }
  }
}

</style>
<template>
  <div class="workDynamicst">
    <div class="contentTop">
      <div class="top-box">
        <div class="img-box">
          <img :src="content.showImageUrl">
          <div class="shadow">
            <span class="title_s">{{content.title}}</span>
            <span class="time_s">{{$bw.format(content.postTime,'date')}}</span>
          </div>
          <div class="prev" @click="getContent(content.prevId)" v-show="content.prevId">&lt;</div>
              <div class="next" @click="getContent(content.nextId)" v-show="content.nextId">&gt;</div>
          </div>
          <div class="title-box">
            <div class="title">{{content.title}}</div>
            <div class="time">{{$bw.format(content.postTime,'date')}}</div>
          </div>
        </div>
        <div class="content">
          <el-col :xs="24" :sm="24" :md="24" :lg="24" v-html="content.body" class="htmlWrap">
          </el-col>
        </div>
        <div class="other-link">
          <div class="pre" @click="getContent(content.prevId)" v-show="content.prevId">
            <span>上一篇：</span>
            <span>{{content.prevTitle}}</span>
          </div>
          <div @click="getContent(content.nextId)" v-show="content.nextId">
            <span>下一篇：</span>
            <span>{{content.nextTitle}}</span>
          </div>
        </div>
      </div>
    </div>
</template>
<script>
export default {
  data() {
    return {
      contentId: '',
      content: {},
      prevId: '',
      nextId: ''
    }
  },
  components: {},
  methods: {
    goPage(val) {
      this.$router.push({ path: '/indexWorkDynamicst', query: { contentId: val } })
      window.location.reload()
    },
    jump(contentId) {
      this.$router.push({ path: '/indexWorkDynamicst', query: { contentId: contentId } })
    },
    getContent(contentId) {
      this.$service('/api/CMSMain/GetContentDetail?contentId=' + contentId, 'get', {})
        .then((response) => {
          this.content = response.Data;
        })
    }
  },
  mounted() {
    this.contentId = this.$route.query.contentId;
    this.getContent(this.contentId);
  },
  watch: {
    // shopNo改变时重新加载
    shopNo: function(newShopNo) {
      this.loadShop();
    }
  },
}

</script>
